<template>
  <div class="changePassword">
    <Header title="修改登录密码" />
    <van-form @submit="onSubmit">
      <van-field
        v-model="username"
        name="用户名"
        placeholder="请输入登录账号"
      />
      <van-field
        v-model="password"
        type="password"
        name="密码"
        placeholder="请输入旧密码"
      />
      <van-field v-model="username" name="用户名" placeholder="请输入新密码" />
      <van-field
        v-model="password"
        type="password"
        name="密码"
        placeholder="请再次确认密码"
      />
      <div class="btn_box" style="margin: 16px">
        <van-button
          class="van_btn"
          type="info"
          native-type="submit"
          size="normal"
          @click="submit()"
          >确认</van-button
        >
      </div>
    </van-form>
  </div>
</template>

<script>
import Header from "../components/header";
export default {
  components: {
    Header,
  },
  data() {
    return {
      username: "",
      password: "",
    };
  },
  methods: {
    onSubmit(values) {
      console.log("submit", values);
    },
    
    submit() {
      this.$router.push("/membership");
    },
  },
};
</script>

<style lang="less">
.btn_box {
  display: flex;
  justify-content: center;
}
.van_btn {
  width: 150px;
  height: 40px;
  background: #169bd5 !important;
  border-radius: 10px!important;
}
</style>